<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.io.*, java.sql.*, java.util.*,LS.*"%>
<%
	request.setCharacterEncoding("utf-8");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="/LSsystem/assets/css/top.css" rel="stylesheet">
<link href="/LSsystem/assets/css/bootstrap.css" rel="stylesheet">
<link href="/LSsystem/assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/LSsystem/assets/css/docs.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.7.min.js"></script>

<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript"
	src="/LSsystem/assets/smartPop/jquery.smartPop.js"></script>
<link rel="stylesheet" href="/LSsystem/assets/smartPop/jquery.smartPop.css" />
</head>
<body>
	
	<!-- 메뉴
    ================================================== -->
	<div class="navbar navbar-inverse navbar-fixed-top" style="font-size:20px;">
		<div class="navbar-inner">
			<div class="container" id="menubar">
				<button type="button" class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse" style="float: left">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<!-- <a class="brand" href="index.do" style="float:left">기자재대여 from skhu</a> -->
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li class="active"><a href="/LSsystem/index.do">HOME</a></li>
						<li class="dropdown"><a class="dropdown-toggle"
							data-toggle="dropdown" href="#"> 공지사항<b class="caret"></b>
						</a>
							<ul class="dropdown-menu">
								<li><a href="/LSsystem/notice.do">공지사항</a></li>
							</ul></li>

						<li class="dropdown">
							<a class="dropdown-toggle"
								data-toggle="dropdown" href="">대여<b class="caret"></b>
							</a>
							<ul class="dropdown-menu">
								<li><a href="/LSsystem/u/practice.do">실습용 대여</a></li>
							</ul>
						</li>

						<li class=""><a href="/LSsystem/u/extends.do">연장</a></li>
						
						<li class="dropdown"><a class="dropdown-toggle"
							data-toggle="dropdown" href="">내 정보<b class="caret"></b>
						</a>
							<ul class="dropdown-menu">
								<li><a href="/LSsystem/u/lendingstate.do">대여 및 신청현황</a></li>
								<li><a href="/LSsystem/u/modify.do">내 정보 수정</a></li>
								<li><a href="/LSsystem/u/modifyPw.do">비밀번호 변경</a></li>
							</ul></li>
					</ul>
				</div>
				<form method="post" style="text-align: right; margin: 0px;">
					<div class="logout">
						<b id="logname">
							<%
								Users u = (Users) session.getAttribute("user");
								out.println(u.getName() + "님 접속중 입니다.");
							%>
						</b> <input id="logout" type="submit" class="btn" value="로그아웃"
							name="cmd">
					</div>
				</form>
			</div>
		</div>
	</div>

	<%
		if (request.getParameter("cmd") != null) {
			if (request.getParameter("cmd").equals("로그아웃")) {
				session.setAttribute("user", null);
				session.setAttribute("departments_id", null);
				session.setAttribute("departments_id2", null);
				session.setAttribute("level", null);

				%>
				
				<script>
					location.href='/LSsystem/index.do';
				</script>
				
				<%
			/* 
			response.sendRedirect("/LSsystem/index.do"); 
				 */
			}
		}
	%>
	<!-- javascript -->
	<script src="/LSsystem/assets/js/bootstrap-dropdown.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$('.dropdown-toggle').dropdown();
		});
	</script>
</body>
</html>